Skip to content

cmd/go: validate inferred module path for go mod init#76432

Closed
chenyanchen wants to merge 1 commit intogolang:masterfrom
chenyanchen:fix/validate-go-mod-init-inferred-path
Closed

cmd/go: validate inferred module path for go mod init#76432
chenyanchen wants to merge 1 commit intogolang:masterfrom
chenyanchen:fix/validate-go-mod-init-inferred-path

Conversation

@chenyanchen
Copy link
Copy Markdown
Contributor

Ensure go mod init validates the module path even when it is inferred from GOPATH.

Fixes #73121

@gopherbot
Copy link
Copy Markdown
Contributor

This PR (HEAD: 8ff1ca2) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/723640.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Jorropo:

Patch Set 1: Code-Review+1 Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Go LUCI:

Patch Set 1:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-11-24T10:20:19Z","revision":"5638c547c6d57a4a0389c05728d49076bcaae994"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Jorropo:

Patch Set 1: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Go LUCI:

Patch Set 1:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-amd64-boringcrypto has failed with summary (view all results):


To reproduce, try gomote repro 8697327017085754481.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Go LUCI:

Patch Set 1: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Yanchen Chen:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Sean Liao:

Patch Set 2: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-02-06T20:16:54Z","revision":"39e166dc529a21eb7a473436b7e608309ffbb88d"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Sean Liao:

Patch Set 2: -Commit-Queue

(Posted by golang-scoped@luci-project-accounts.iam.gserviceaccount.com on behalf of sean@liao.dev)


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Go LUCI:

Patch Set 2:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Go LUCI:

Patch Set 2: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Sean Liao:

Patch Set 2: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Michael Matloob:

Patch Set 2: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Contributor

Message from Junyang Shao:

Patch Set 2: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/723640.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Feb 14, 2026
Ensure `go mod init` validates the module path even when it is inferred from GOPATH.

Fixes #73121

Change-Id: I8b7785ff57eec17bba432f48c8e3a18a2f92aab5
GitHub-Last-Rev: 8ff1ca2
GitHub-Pull-Request: #76432
Reviewed-on: https://go-review.googlesource.com/c/go/+/723640
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
@gopherbot
Copy link
Copy Markdown
Contributor

This PR is being closed because golang.org/cl/723640 has been merged.

@gopherbot gopherbot closed this Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cmd/go: mod init should not infer a path with a /v1 suffix

2 participants